<%-- 
    Document   : result
    Created on : Apr 14, 2012, 6:00:30 PM
    Author     : Vishwakarma
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.sql.*"%>
<%@page import="jobportal.Dbconn" %>
<%@include file="header.jsp" %>
<%try{
   String jobid="";
   Connection con=Dbconn.getConn();
   Statement st=con.createStatement();
   jobid=request.getParameter("jobid");
   String   sql="SELECT college.clgid,registrationno,student.username,name,dob,clgname,email,student.status,job_applied.result  FROM student,college,job_applied where job_applied.jobid='"+jobid+"' and job_applied.result='PASS'  and student.clgid=college.clgid and student.username=job_applied.username";
  //out.println(sql);
  String header="";
  
   ResultSet rs=st.executeQuery("select jobtitle,compname from jobs,company where jobs.compid=company.compid and jobs.jobid='"+jobid+"'");
	if(rs.next()){
	header=" for "+ rs.getString(1)+ " in "+rs.getString(2);
	}
   rs=st.executeQuery(sql);
%>


<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td align="center" valign="top">

            <span class='messagesred' style="text-align:center">
            </span>

            <table width="100%" border="0" cellspacing="0" >
                <tr>
                    <td width="100%" align="left" valign="top"><span class="mainheading_emp" style="margin-bottom:10px;"> List of Successful Candidates <%=header%></span></td>
                </tr>
                
                <tr>
                    <td height="26" align="center" valign="top" class="normal">
                        <table width="100%" border="0" cellspacing="2"  class="tbl_bdr">
                            <tr class="sde_mnu_hdr_blue" style="color:#000066;font-weight:bold" align="center" >
                                <td width="46" height="33"  valign="middle" class="subjeading" style="background-color: skyblue">#</td>
                                <td width="151"  valign="middle" class="subjeading" style="background-color: skyblue">Photo</td>
                              <td width="231"  valign="middle" class="subjeading" style="background-color: skyblue">Registration No </td>
                              <td width="260"  valign="middle" class="subjeading" style="background-color: skyblue"><span class="subjeading" style="background-color: skyblue">Name</span></td>
                              <td width="304"  valign="middle" class="subjeading" style="background-color: skyblue">College</td>
                              
                          </tr>

                             <%
                                int i=0;
                                while (rs.next()) { i++;
                             %>
                            <tr class="greybg" style="font-weight:bold" align="center">
                                <td height="90" align="center" valign="middle"><%=i%></td>
                              <td  valign="middle"><img src="./src/getpic.jsp?id=<%=rs.getString("username")%>&table=student&col=photo&pk_col=username" width="72" height="73" border="0" /></td>
                              <td  valign="middle"><%= rs.getString("registrationno")%></td>
                                <td valign="middle"><%= rs.getString("name")%></td>
                                <td  valign="middle"><%=rs.getString("clgname")%></td>
                                

<%}%>
<tr align="center">
                 <td width="46" height="30" align="center" valign="middle" class="subjeading" style="background-color: skyblue"></td>
                <td width="151"  valign="middle" class="subjeading" style="background-color: skyblue"></td>
                <td width="231"  valign="middle" class="subjeading" style="background-color: skyblue"></td>
                <td width="260"  valign="middle" class="subjeading" style="background-color: skyblue"></td>
                <td width="304"  valign="middle" class="subjeading" style="background-color: skyblue"></td>
                
                          </tr>
                  </table></td>
                </tr>
            </table></td>
    </tr>
</table>
<%}catch(Exception e){
out.println("<font color=\"black\">"+e+"</font>");
}%>
<a href="http://apycom.com/"></a>